<!DOCTYPE html>
<html lang="en">
<head>
    <title>汽车配件订购系统</title>

    <!-- Meta tags -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- Style -->
    <link rel="stylesheet" href="../css/style1.css" type="text/css" media="all"/>
    <script src="../js/jquery-3.2.1.min.js"></script>
</head>

<body>

<section class="w3l-signup">
    <div class="overlay">
        <div class="wrapper">
            <div class="logo">
                <a class="brand-logo" href="index.html">炫酷的赛车配件订购系统</a>
            </div>
            <div class="form-section">
                <h3>注册</h3>

                <form id="abc">
                    <div class="form-input">
                        <input type="text" name="uname" placeholder="来将可留姓名？" required="required" autofocus>
                    </div>
                    <div class="form-input">
                        <input type="password" name="upassword" placeholder="天王盖地虎！" required="required">
                    </div>
                    <div class="form-select">

                        <select name="shenfen" style="width: 100%;border:0px; font-size: 16px">
                            <option value="商家">商家</option>
                            <option value="顾客">顾客</option>

                        </select>
                    </div>

                    <button type="button" class="btn btn-primary theme-button mt-4" onclick="login()">进入</button>

                </form>

                <p class="signup">是时候去秘密基地了！ <a href="/user/index" class="signuplink">giao~</a></p>
            </div>
        </div>
    </div>
    <div id='stars'></div>
    <div id='stars2'></div>
    <div id='stars3'></div>

    <div class="copy-right">
        <p>草原上最美的花~</p>
    </div>

</section>
<script>
    function login() {
        $.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            url: "../yonghu/zhucebt",//url
            data: $('#abc').serialize(),
            success: function (data) {
                //  window.location.reload();
                alert("注册成功！")
            }, error: function (error) {
                alert("失败")
            }
        });

    }
</script>
</body>
</html>